package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "sell_", schema = "boot", catalog = "")
//销售费用表
public class Sell {
    private int sellId;//销售费用id
    private String sellName;//经办人
    private Timestamp sellTime;//日期
    private BigDecimal sellMoney;//金额
    private String sellType;//费用类别
    private BigDecimal sellReimburse;//报销
    private String sellApprover;//审核人
    private String sellCondition;//审核状态
    private String sellYongt;//用途
    private Integer sellPjzs;//票据张数
    private String sellBeiz;//备注
    private Integer sellRshu;//人数
    private Integer sellztai;//删除状态
    private User empId;//员工id
    private Kehu kId;//客户id

    @Id
    @Column(name = "Sell_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getSellId() {
        return sellId;
    }

    public void setSellId(int sellId) {
        this.sellId = sellId;
    }

    //多个销售费用对应一个客户
    @ManyToOne
    @JoinColumn(name = "k_id", nullable = true)
    public Kehu getkId() {
        return kId;
    }

    public void setkId(Kehu kId) { this.kId = kId; }

    //多个销售费用对应一个经手人
    @ManyToOne
    @JoinColumn(name = "emp_id", nullable = true)
    public User getEmpId() {
        return empId;
    }

    public void setEmpId(User empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "Sell_name", nullable = true, length = 200)
    public String getSellName() {
        return sellName;
    }

    public void setSellName(String sellName) {
        this.sellName = sellName;
    }

    @Basic
    @Column(name = "Sell_time", nullable = false)
    public Timestamp getSellTime() {
        return sellTime;
    }

    public void setSellTime(Timestamp sellTime) {
        this.sellTime = sellTime;
    }

    @Basic
    @Column(name = "Sell_money", nullable = true, precision = 0)
    public BigDecimal getSellMoney() {
        return sellMoney;
    }

    public void setSellMoney(BigDecimal sellMoney) {
        this.sellMoney = sellMoney;
    }

    @Basic
    @Column(name = "Sell_type", nullable = true, length = 200)
    public String getSellType() {
        return sellType;
    }

    public void setSellType(String sellType) {
        this.sellType = sellType;
    }

    @Basic
    @Column(name = "Sell_reimburse", nullable = true, precision = 0)
    public BigDecimal getSellReimburse() {
        return sellReimburse;
    }

    public void setSellReimburse(BigDecimal sellReimburse) {
        this.sellReimburse = sellReimburse;
    }

    @Basic
    @Column(name = "Sell_approver", nullable = true, length = 200)
    public String getSellApprover() {
        return sellApprover;
    }

    public void setSellApprover(String sellApprover) {
        this.sellApprover = sellApprover;
    }

    @Basic
    @Column(name = "Sell_condition", nullable = true, length = 200)
    public String getSellCondition() {
        return sellCondition;
    }

    public void setSellCondition(String sellCondition) {
        this.sellCondition = sellCondition;
    }

    @Basic
    @Column(name = "Sell_yongt", nullable = true, length = 255)
    public String getSellYongt() {
        return sellYongt;
    }

    public void setSellYongt(String sellYongt) {
        this.sellYongt = sellYongt;
    }

    @Basic
    @Column(name = "Sell_pjzs", nullable = true)
    public Integer getSellPjzs() {
        return sellPjzs;
    }

    public void setSellPjzs(Integer sellPjzs) {
        this.sellPjzs = sellPjzs;
    }

    @Basic
    @Column(name = "Sell_beiz", nullable = true, length = 255)
    public String getSellBeiz() {
        return sellBeiz;
    }

    public void setSellBeiz(String sellBeiz) {
        this.sellBeiz = sellBeiz;
    }

    @Basic
    @Column(name = "Sell_rshu", nullable = true)
    public Integer getSellRshu() {
        return sellRshu;
    }

    public void setSellRshu(Integer sellRshu) {
        this.sellRshu = sellRshu;
    }

    @Basic
    @Column(name = "Sell_ztai", nullable = true)
    public Integer getSellztai() {
        return sellztai;
    }

    public void setSellztai(Integer sellztai) {
        this.sellztai = sellztai;
    }

    public Sell(String sellName, Timestamp sellTime, BigDecimal sellMoney, String sellType, String sellApprover, String sellYongt, Integer sellPjzs, String sellBeiz, Integer sellRshu, Integer sellztai, Kehu kId) {
        this.sellName = sellName;
        this.sellTime = sellTime;
        this.sellMoney = sellMoney;
        this.sellType = sellType;
        this.sellApprover = sellApprover;
        this.sellYongt = sellYongt;
        this.sellPjzs = sellPjzs;
        this.sellBeiz = sellBeiz;
        this.sellRshu = sellRshu;
        this.sellztai = sellztai;
        this.kId = kId;
    }

    public Sell() {
    }
}
